using CodeSaude.Domain.Entities;
using System.ComponentModel.DataAnnotations;
using System.Data.Entity.ModelConfiguration;

namespace CodeSaude.Infrastructure.Data.EntityConfig
{
    public class cep_ufMap : EntityTypeConfiguration<cep_uf>
    {
        public cep_ufMap()
        {
            // Primary Key
            this.HasKey(t => t.uf);

            // Properties
            this.Property(t => t.uf)
                .IsRequired()
                .HasMaxLength(2);

            // Table & Column Mappings
            this.ToTable("cep_uf");
            this.Property(t => t.uf).HasColumnName("uf");
        }
    }
}
